]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
[StTable] Align children to integral positions
authorColin Walters <walters@verbum.org>
Tue, 25 May 2010 15:21:07 +0000 (11:21 -0400)
committerColin Walters <walters@verbum.org>
Tue, 25 May 2010 15:21:34 +0000 (11:21 -0400)
Like the other St widgets, ensure we position children at integrals.

https://bugzilla.gnome.org/show_bug.cgi?id=619623

src/st/st-table.c

index 5a2645fe833a6f2e326cc818f5607227809450fb..2d832ab5b9562df59a765af2d5cec4fdb01fa62a 100644 (file)
@@ -234,12 +234,12 @@ st_table_homogeneous_allocate (ClutterActor          *self,
   col_spacing = priv->col_spacing;
   row_spacing = priv->row_spacing;
 
-  col_width = (int) (content_box->x2 - content_box->x1
-               - (col_spacing * (priv->n_cols - 1)))
-              / priv->n_cols + 0.5;
-  row_height = (int) (content_box->y2 - content_box->y1
-                - (row_spacing * (priv->n_rows - 1)))
-               / priv->n_rows + 0.5;
+  col_width = (int) ((content_box->x2 - content_box->x1
+                      - (col_spacing * (priv->n_cols - 1)))
+                     / priv->n_cols + 0.5);
+  row_height = (int) ((content_box->y2 - content_box->y1
+                      - (row_spacing * (priv->n_rows - 1)))
+                      / priv->n_rows + 0.5);
 
   children = st_container_get_children_list (ST_CONTAINER (self));
   for (list = children; list; list = list->next)